<%-- 
    Document   : index
    Created on : Dec 7, 2012, 12:51:47 PM
    Author     : doraemon
--%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>

<legend>
    Location Listing
</legend>
<table class="table table-striped">
    <tr>
        <th>Name</th>
        <th>Description</th>
        <th>Address</th>
        <th>Photo</th>
        <th>Action</th>
    </tr>
    
    <tr>
        <td><a href='<s:url action="Location" />/show'><s:property value="location.name" /></a></td>               
        <td><s:property value="location.description" /></td>
        <td><s:property value="location.address" /></td>
        <td><img src='<s:property value="location.photo" />' /></td>
        <td>
            <s:url action="Location/edit" var="editURL">
                <s:param name="id" value="location.id" />
            </s:url>
            <a href='<s:property value="#editURL" />'>Edit</a>&nbsp;
            <s:url action="Location/delete" var="deleteURL">
                <s:param name="id" value="location.id" />
            </s:url>
            <a href='<s:property value="#deleteURL" />'>Delete</a>
        </td>
    </tr>
    
</table>
<h4>  
  <a href='<s:url action="Location"/>/create'>Create a new location</a>  
</h4>  